﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using Common;
using System.Windows.Forms;

namespace EHR18
{
    public partial class usrngrate : UserControl
    {
        Counter _counter;
        public string MyName
        {
            get { return groupBox1.Text; }
            set
            {
                groupBox1.Text = value;
                Name = value;
            }
        }
        public usrngrate(string Name)
        {
            InitializeComponent();
            this.groupBox1.Text = Name;
            MyName = Name;
            _counter = CountManager.getCount(MyName);
        }
        public usrngrate()
        {
            InitializeComponent();
        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            _counter = CountManager.getCount(MyName);
            this.a.Value = _counter.Total.ToString();
            this.b.Value = _counter.NG.ToString();
            this.b1.Value = _counter.NgRate;
            this.c.Value = _counter.OK.ToString();
            this.c1.Value = _counter.PassRate;
        }
    }
}
